<%@page pageEncoding="UTF-8" contentType="text/html; UTF-8" isELIgnored="false" %>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>添加客舱</title>
    <link rel="stylesheet" href="css/add_cabin.css">
</head>
<body>
<div class="form-container">
    <%
        String flightId =request.getParameter("flightId");
        if (request.getAttribute("cabin_msg") != null)
        {
    %>
    <div class="error-message"><%= request.getAttribute("cabin_msg") %></div>
    <%
        }
    %>
    <h2>当前航班：<%=flightId %></h2>
    <form action="addCabin" method="post" class="form-container">
        <h2>添加客舱信息</h2>
        <div class="form-row">
            <div class="form-group">
                <label for="id">客舱号：</label>
                <input type="text" id="id" name="id" required>
            </div>
            <div class="form-group">
                <label for="name">客舱名：</label>
                <input type="text" id="name" name="name" required>
            </div>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label for="food">餐食：</label>
                <input type="text" id="food" name="food" required>
            </div>
            <div class="form-group">
                <label for="service">服务：</label>
                <input type="text" id="service" name="service" required>
            </div>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label for="hand_baggage">手提行李限额：</label>
                <input type="text" id="hand_baggage" name="hand_baggage" required>
            </div>
            <div class="form-group">
                <label for="checked_baggage">免费托运行李限额：</label>
                <input type="text" id="checked_baggage" name="checked_baggage" required>
            </div>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label for="price">价格：</label>
                <input type="text" id="price" name="price" required>
            </div>
            <div class="form-group">
                <label for="capacity">总容量：</label>
                <input type="text" id="capacity" name="capacity" required>
            </div>
        </div>
        <input type="hidden" name="flightId" value="<%=flightId %>" required>
        <input type="submit" value="提交">
    </form>
</div>
</body>
</html>